package edu.pku.sei.act.main.action;

import edu.pku.sei.act.ctrl.editpart.ArchiModelEditPartFactory;
import edu.pku.sei.act.main.palette.ArchiModelerPackagePaletteFactory;
import edu.pku.sei.gmp.editor.GMPEditorInput;
import edu.pku.sei.gmp.editor.action.AbstractOpenDiagramAction;
import edu.pku.sei.gmp.model.common.GMPModel;

public class ArchiModelerOpenPackageDiagramAction extends AbstractOpenDiagramAction{

	public ArchiModelerOpenPackageDiagramAction() {
		super();
	}
	
	public ArchiModelerOpenPackageDiagramAction(Object treeObject) {
		super(treeObject);
	}
	
	@Override
	public void configureEditorInput(GMPEditorInput input) {
		GMPModel model = input.getDiagram().getModel();
		input.setEditPartFactory(new ArchiModelEditPartFactory());
		input.setPaletteFactory(new ArchiModelerPackagePaletteFactory(model));
		
	}

}